'use strict'
import jsonp from '../common/js/jsonp'
import { commonParams, options } from './config'
import ajax from "axios"

export default {
  getRecommend () {
    const url = 'https://c.y.qq.com/musichall/fcgi-bin/fcg_yqqhomepagerecommend.fcg'
    const data = Object.assign({}, commonParams, {
      format:'jsonp',
      platform:'h5',
      uin:0,
      needNewCode:1
    })
    return jsonp(url, data, options)
  },
  getSongList() {
    // ajax.get("http://172.18.18.51:8380/songList.json").then((res)=>{
    //   console.log(res.data);
    // })
  },
  getSinger () {
    const url = 'https://c.y.qq.com/v8/fcg-bin/v8.fcg'
    const data = Object.assign({}, commonParams, {
      channel: 'singer',
      page: 'list',
      key: 'all_all_all',
      pagesize: 100,
      pagenum: 1,
      hostUin: 0,
      needNewCode: 0,
      platform: 'yqq'
    })
    return jsonp(url, data, options)
  }
}

